package com.appinterfacelite.controller;

import com.appinterfacelite.service.impl.MenuServiceImpl;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/menu")
public class MenuController {

    @Autowired
    MenuServiceImpl menuService;



    @PostMapping("/homepage_detail")
    @ResponseBody
    public JSONObject homepage_detail(String user_id) {
        JSONObject jsonObject = menuService.queryMenu(user_id);
        return jsonObject;
    }

}
